home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Shareware / Auslogics BoostSpeed 4.2.7.172 / boost-speed-setup.exe / {app} / RegCleaner.exe / 1033 / TEMPLATES / REPORT_TEMPLATE
Extensible Markup Language  |  2008-10-30  |  12KB  |  283 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4.   <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.01//EN" encoding="utf-8" />
  5.  
  6.   <xsl:decimal-format name="decimal-format" decimal-separator="." grouping-separator="," />
  7.  
  8.   <xsl:variable name="failed_status" select="'%STATUS_FAILED%'"/>
  9.  
  10.   <xsl:template match="/">
  11.     <html>
  12.       <head>
  13.         <title>Auslogics Registry Cleaner Report</title>
  14.         <style type="text/css">
  15.           .note { BACKGROUND-COLOR:  #ffffff; COLOR: #336699; FONT-FAMILY: "Verdana", sans-serif; FONT-SIZE: 100%; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 0px;MARGIN-TOP: 0px; PADDING-RIGHT: 10px}
  16.           .infotable { BACKGROUND-COLOR: #f0f0e0; BORDER-BOTTOM: #ffffff 0px solid; BORDER-COLLAPSE: collapse; BORDER-LEFT: #ffffff 0px solid; BORDER-RIGHT: #ffffff 0px  solid; BORDER-TOP: #ffffff 0px solid; BORDER-COLOR:white; FONT-SIZE: 70%; MARGIN-LEFT: 10px }
  17.           .header { BACKGROUND-COLOR: #cecf9c; BORDER-BOTTOM: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid;  BORDER-TOP: #ffffff 1px solid; COLOR: #000000; FONT-WEIGHT: bold }
  18.           .content { BACKGROUND-COLOR: #e7e7ce; BORDER-BOTTOM: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid;     BORDER-TOP: #ffffff 1px solid;  PADDING-LEFT: 3px }
  19.           .failed_content { BACKGROUND-COLOR: #ff8a8a; PADDING-LEFT: 3px }
  20.           .foot-r { BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; text-align:right; padding-right:10px;}
  21.           .foot-l { BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; text-align:left; padding-left:10px;}
  22.           .beforeline { BACKGROUND-COLOR: red;  COLOR: red; }
  23.           .afterline { BACKGROUND-COLOR: green;  COLOR: green; }
  24.           H1 { BACKGROUND-COLOR: #003366; BORDER-BOTTOM: #336699 6px solid; COLOR: #ffffff; FONT-SIZE: 130%; FONT-WEIGHT: normal; MARGIN: 0em 0em 0em -20px; PADDING-BOTTOM: 8px;  PADDING-LEFT: 30px; PADDING-TOP: 16px }
  25.           H2 { COLOR: #000000; FONT-SIZE: 80%; FONT-WEIGHT: bold; MARGIN-BOTTOM: 3px; MARGIN-LEFT: 10px; MARGIN-TOP: 20px; PADDING-RIGHT: 20px }
  26.           P { FONT-FAMILY: "Verdana", sans-serif; FONT-SIZE: 70%; LINE-HEIGHT: 12pt; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 10px; MARGIN-TOP: 10px}
  27.           BODY { BACKGROUND-COLOR: white; FONT-FAMILY: "Verdana", sans-serif; FONT-SIZE: 100%; MARGIN-LEFT: 0px;     MARGIN-TOP: 0px }
  28.           A:link { COLOR: #336699; TEXT-DECORATION: underline }
  29.           A:visited { COLOR: #336699; }
  30.           A:active { COLOR: #336699; }
  31.           A:hover { COLOR: #003366; TEXT-DECORATION: underline }
  32.         </style>
  33.       </head>
  34.       <body>
  35.         <h1>%HEADER_REPORT_TITLE%</h1>
  36.         <table align="center" width="100%" border="0">
  37.           <tr>
  38.             <td>
  39.               <p>
  40.                 <span class="note">
  41.                   <b>%HEADER_TIME% </b>
  42.                   <xsl:value-of select="/report/info/reportTime"/>
  43.                 </span>
  44.               </p>
  45.               <p>
  46.                 <h2>
  47.                   %HEADER_USER% "<xsl:value-of select="/report/info/user"/>"
  48.                 </h2>
  49.               </p>
  50.             </td>
  51.           </tr>
  52.           <tr>
  53.             <td>
  54.               <table align="center" cellpadding="2" cellspacing="0" width="100%" border="1" bordercolor="white" class="infotable">
  55.                 <!--Summary-->
  56.                 <tr>
  57.                   <td colspan="2" class="header">
  58.                     %HEADER_SUMMARY%
  59.                   </td>
  60.                 </tr>
  61.                 <tr>
  62.                   <td class="content" width="45%">
  63.                     <br/>
  64.                   </td>
  65.                   <td class="content">
  66.                     <br/>
  67.                   </td>
  68.                 </tr>
  69.                 <tr>
  70.                   <td class="foot-r">
  71.                     %HEADER_KEYS_PROCESSED%
  72.                   </td>
  73.                   <td class="foot-l">
  74.                     <xsl:value-of select="/report/scanLog/summary/totalKeysScanned"/>
  75.                   </td>
  76.                 </tr>
  77.                 <tr>
  78.                   <td class="foot-r">
  79.                     %HEADER_PROBLEMS_FOUND%
  80.                   </td>
  81.                   <td class="foot-l">
  82.                     <xsl:value-of select="/report/scanLog/summary/totalProblemsFound"/>
  83.                   </td>
  84.                 </tr>
  85.                 <tr>
  86.                   <td class="foot-r">%HEADER_PROBLEMS_FIXED%</td>
  87.                   <td class="foot-l">
  88.                     <xsl:value-of select="/report/cleanLog/summary/problemsFixed"/>
  89.                   </td>
  90.                 </tr>
  91.                 <tr>
  92.                   <td class="foot-r">%HEADER_PROBLEMS_FAILED%</td>
  93.                   <td class="foot-l">
  94.                     <xsl:value-of select="/report/cleanLog/summary/failedToFix"/>
  95.                   </td>
  96.                 </tr>
  97.                 <tr>
  98.                   <td class="foot-r">%HEADER_CLEANING_STARTED%</td>
  99.                   <td class="foot-l">
  100.                     <xsl:value-of select="/report/cleanLog/summary/cleanStartTime"/>
  101.                   </td>
  102.                 </tr>
  103.                 <tr>
  104.                   <td class="foot-r">%HEADER_CLEANING_FINISHED%</td>
  105.                   <td class="foot-l">
  106.                     <xsl:value-of select="/report/cleanLog/summary/cleanFinishTime"/>
  107.                   </td>
  108.                 </tr>
  109.                 <tr>
  110.                   <td class="foot-r">%HEADER_CLEANING_TIME%</td>
  111.                   <td class="foot-l">
  112.                     <xsl:call-template name="formatTime">
  113.                       <xsl:with-param name="time" select="/report/cleanLog/summary/cleanTotalTime" />
  114.                     </xsl:call-template>
  115.                   </td>
  116.                 </tr>
  117.                 <tr>
  118.                   <td class="foot-r">
  119.                     <b>
  120.                       %HEADER_BEFORE%
  121.                     </b>
  122.                   </td>
  123.                   <td class="foot-l">
  124.                     <span class="beforeline">
  125.                       <!--Draw fragmentation graph-->
  126.                       <xsl:call-template name="drawGraph">
  127.                         <xsl:with-param name="x" select="100 - /report/cleanLog/summary/performanceBoost"/>
  128.                       </xsl:call-template>
  129.                     </span>
  130.                     <xsl:text>
  131.                     </xsl:text>
  132.                     <xsl:value-of select="format-number((100 - /report/cleanLog/summary/performanceBoost) div 100, '0.0#%', 'decimal-format')"/>
  133.                   </td>
  134.                 </tr>
  135.                 <tr>
  136.                   <td class="foot-r">
  137.                     <b>
  138.                       %HEADER_AFTER%
  139.                     </b>
  140.                   </td>
  141.                   <td class="foot-l">
  142.                     <span class="afterline">
  143.                       <!--Draw fragmentation graph-->
  144.                       <xsl:call-template name="drawGraph">
  145.                         <xsl:with-param name="x" select="/report/cleanLog/summary/performanceBoost"/>
  146.                       </xsl:call-template>
  147.                     </span>
  148.                     <xsl:text>
  149.                     </xsl:text>
  150.                     <xsl:call-template name="showPercent">
  151.                       <xsl:with-param name="x" select="/report/cleanLog/summary/performanceBoost"/>
  152.                     </xsl:call-template>
  153.                   </td>
  154.                 </tr>
  155.                 <tr height="10px">
  156.                   <td colspan="2" class="foot-r">
  157.                     <br/>
  158.                   </td>
  159.                 </tr>
  160.               </table>
  161.             </td>
  162.           </tr>
  163.  
  164.           <!--Categories-->
  165.           <xsl:for-each select="/report/cleanLog/categories/category">
  166.             <xsl:if test="count(problems/problem) > 0">
  167.               <tr>
  168.                 <td>
  169.                   <table align="center" cellpadding="2" cellspacing="0" width="100%" border="1" bordercolor="white" class="infotable">
  170.                     <tr class="header">
  171.                       <td colspan="3">
  172.                         %SECTION_HEADER%
  173.                         <xsl:value-of select="name"/>
  174.                       </td>
  175.                     </tr>
  176.                     <tr class="content">
  177.                       <td width="60%">%COLUMN_KEY%</td>
  178.                       <td width="25%">%COLUMN_DESC%</td>
  179.                       <td width="15%">%COLUMN_STATUS%</td>
  180.                     </tr>
  181.                     <xsl:for-each select="problems/problem">
  182.                       <tr class="foot-l">
  183.                         <td>
  184.                           <xsl:if test="status = $failed_status">
  185.                             <xsl:attribute name="class">
  186.                               failed_content
  187.                             </xsl:attribute>
  188.                           </xsl:if>
  189.                           <xsl:value-of select="key"/>
  190.                           <xsl:if test="value != ''">
  191.                             ,
  192.                             <xsl:value-of select="value"/>
  193.                           </xsl:if>
  194.                         </td>
  195.                         <td>
  196.                           <xsl:if test="status = $failed_status">
  197.                             <xsl:attribute name="class">
  198.                               failed_content
  199.                             </xsl:attribute>
  200.                           </xsl:if>
  201.                           <xsl:value-of select="description"/>
  202.                         </td>
  203.                         <td>
  204.                           <xsl:if test="status = $failed_status">
  205.                             <xsl:attribute name="class">
  206.                               failed_content
  207.                             </xsl:attribute>
  208.                           </xsl:if>
  209.                           <xsl:value-of select="status"/>
  210.                         </td>
  211.                       </tr>
  212.                     </xsl:for-each>
  213.                   </table>
  214.                 </td>
  215.               </tr>
  216.               <tr height="10px"/>
  217.             </xsl:if>
  218.           </xsl:for-each>
  219.  
  220.           <tr>
  221.             <td>
  222.               <hr align="center" width="100%"/>
  223.               <p>
  224.                 <span class="note">
  225.                   <b>
  226.                     Auslogics Pty Ltd - <a href="http://www.auslogics.com/registry-cleaner">%VISIT_SITE%</a>
  227.                   </b>
  228.                 </span>
  229.               </p>
  230.             </td>
  231.           </tr>
  232.         </table>
  233.       </body>
  234.     </html>
  235.   </xsl:template>
  236.  
  237.   <xsl:template name="drawGraph">
  238.     <!--This template draws a error rate graph-->
  239.     <xsl:param name="x" select="0"/>
  240.     <xsl:if test="$x > 0">
  241.       <xsl:text>|</xsl:text>
  242.       <xsl:call-template name="drawGraph">
  243.         <xsl:with-param name="x" select="$x - 2"/>
  244.       </xsl:call-template>
  245.     </xsl:if>
  246.   </xsl:template>
  247.  
  248.   <xsl:template name="formatTime">
  249.     <xsl:param name="time" select="'01:02:03.4'" />
  250.     <xsl:variable name="h" select="format-number(substring($time,1,2),'0')"/>
  251.     <xsl:variable name="m" select="format-number(substring($time,4,2),'0')"/>
  252.     <xsl:variable name="s" select="format-number(substring($time,7,2),'0')"/>
  253.     <xsl:if test="number($h) > 0">
  254.       <xsl:value-of select="$h"/>
  255.       %TIME_HOURS%
  256.     </xsl:if>
  257.     <xsl:if test="number($m) > 0">
  258.       <xsl:value-of select="$m"/>
  259.       %TIME_MINUTES%
  260.     </xsl:if>
  261.     <xsl:if test="number($s) > 0">
  262.       <xsl:value-of select="$s"/>
  263.       %TIME_SECONDS%
  264.     </xsl:if>
  265.     <xsl:if test="(number($h) = 0) and (number($m) = 0) and (number($s) = 0)">
  266.       %TIME_LESS%
  267.     </xsl:if>
  268.   </xsl:template>
  269.  
  270.   <xsl:template name="showPercent">
  271.     <xsl:param name="x" select="0"/>
  272.     <xsl:choose>
  273.       <xsl:when test="$x > 0">
  274.         <xsl:value-of select="format-number($x div 100, '0.0#%', 'decimal-format')"/>
  275.       </xsl:when>
  276.       <xsl:otherwise>
  277.         < 1%
  278.       </xsl:otherwise>
  279.     </xsl:choose> 
  280.    </xsl:template>
  281.  
  282. </xsl:stylesheet>
  283.